{ //=========Macro generated from canvas: c1/Efficiencies //========= (Sat Mar 28 21:21:15 2009) by ROOT version5.22/00 TCanvas *c1 = new TCanvas("c1", "Efficiencies",0,44,600,600); gStyle->SetOptStat(0); c1->Range(-1.375,-13.75,2.375,123.75); c1->SetFillColor(0); c1->SetBorderMode(0); c1->SetBorderSize(2); c1->SetFrameBorderMode(0); c1->SetFrameBorderMode(0); TH1 *frameP = new TH2F("frameP","",2,-1,2,220,0,1.1); frameP->SetStats(0); frameP->GetXaxis()->SetTitle("log_{10}p(GeV)"); frameP->GetYaxis()->SetTitle("Efficiency"); frameP->GetYaxis()->SetNdivisions(520); frameP->GetYaxis()->SetTitleOffset(1.2); frameP->Draw(""); TGraphAsymmErrors *grae = new TGraphAsymmErrors(15); grae->SetName(""); grae->SetTitle(""); grae->SetFillColor(1); grae->SetLineWidth(2); grae->SetMarkerStyle(24); grae->SetMarkerSize(0.7); grae->SetPoint(0,-0.9,0.3445946); grae->SetPointError(0,0.1,0.1,0.03814709,0.0395327); grae->SetPoint(1,-0.7,0.5431655); grae->SetPointError(1,0.1,0.1,0.02989152,0.02968556); grae->SetPoint(2,-0.5,0.7770419); grae->SetPointError(2,0.1,0.1,0.01994104,0.0191273); grae->SetPoint(3,-0.3,0.925859); grae->SetPointError(3,0.1,0.1,0.01166598,0.01063817); grae->SetPoint(4,-0.1,0.964467); grae->SetPointError(4,0.1,0.1,0.008169548,0.007116577); grae->SetPoint(5,0.1,0.9852725); grae->SetPointError(5,0.1,0.1,0.005151301,0.004185485); grae->SetPoint(6,0.3,0.9866864); grae->SetPointError(6,0.1,0.1,0.004944435,0.003969855); grae->SetPoint(7,0.5,0.984472); grae->SetPointError(7,0.1,0.1,0.005427807,0.004411364); grae->SetPoint(8,0.7,0.9880716); grae->SetPointError(8,0.1,0.1,0.005583005,0.004259773); grae->SetPoint(9,0.9,0.9870801); grae->SetPointError(9,0.1,0.1,0.006714742,0.004991924); grae->SetPoint(10,1.1,0.9959016); grae->SetPointError(10,0.1,0.1,0.006093402,0.002991708); grae->SetPoint(11,1.3,0.9924242); grae->SetPointError(11,0.1,0.1,0.01116766,0.005516931); grae->SetPoint(12,1.5,0.9852941); grae->SetPointError(12,0.1,0.1,0.0213032,0.01065679); grae->SetPoint(13,1.7,1); grae->SetPointError(13,0.1,0.1,0.06183102,0); grae->SetPoint(14,1.9,1); grae->SetPointError(14,0.1,0.1,0.3181538,0); grae->SetMarkerColor(2); grae->SetLineColor(2); grae->Draw("p"); grae1 = new TGraphAsymmErrors(15); grae1->SetName(""); grae1->SetTitle(""); grae1->SetFillColor(1); grae1->SetLineWidth(2); grae1->SetMarkerStyle(20); grae1->SetMarkerSize(0.7); grae1->SetPoint(0,-0.9,0.05755396); grae1->SetPointError(0,0.1,0.1,0.01772194,0.02198521); grae1->SetPoint(1,-0.7,0.302583); grae1->SetPointError(1,0.1,0.1,0.02734563,0.02831217); grae1->SetPoint(2,-0.5,0.7735369); grae1->SetPointError(2,0.1,0.1,0.02154561,0.02062); grae1->SetPoint(3,-0.3,0.9339623); grae1->SetPointError(3,0.1,0.1,0.01134845,0.01025511); grae1->SetPoint(4,-0.1,0.956229); grae1->SetPointError(4,0.1,0.1,0.008930596,0.007902966); grae1->SetPoint(5,0.1,0.9837518); grae1->SetPointError(5,0.1,0.1,0.005384068,0.004419797); grae1->SetPoint(6,0.3,0.9807976); grae1->SetPointError(6,0.1,0.1,0.005790834,0.004834521); grae1->SetPoint(7,0.5,0.9921997); grae1->SetPointError(7,0.1,0.1,0.004074668,0.003021181); grae1->SetPoint(8,0.7,0.9849341); grae1->SetPointError(8,0.1,0.1,0.005969261,0.0047315); grae1->SetPoint(9,0.9,0.9800499); grae1->SetPointError(9,0.1,0.1,0.007871734,0.006251437); grae1->SetPoint(10,1.1,1); grae1->SetPointError(10,0.1,0.1,0.005232171,0); grae1->SetPoint(11,1.3,0.9777778); grae1->SetPointError(11,0.1,0.1,0.01549005,0.01059998); grae1->SetPoint(12,1.5,1); grae1->SetPointError(12,0.1,0.1,0.02105035,0); grae1->SetPoint(13,1.7,1); grae1->SetPointError(13,0.1,0.1,0.06183102,0); grae1->SetPoint(14,1.9,1); grae1->SetPointError(14,0.1,0.1,0.1742602,0); grae1->SetMarkerColor(4); grae1->SetLineColor(4); // grae1->Draw("p"); grae2 = new TGraphAsymmErrors(15); grae2->SetName(""); grae2->SetTitle(""); grae2->SetFillColor(1); grae2->SetLineWidth(2); grae2->SetLineColor(4); grae2->SetMarkerStyle(20); grae2->SetMarkerSize(0.7); grae2->SetName(""); grae2->SetTitle(""); grae2->SetFillColor(2); grae2->SetLineWidth(2); grae2->SetMarkerStyle(20); grae2->SetMarkerSize(0.7); grae2->SetPoint(0,-0.9,0.07194245); grae2->SetPointError(0,0.1,0.1,0.01991166,0.02402047); grae2->SetPoint(1,-0.7,0.3099631); grae2->SetPointError(1,0.1,0.1,0.0275509,0.02848127); grae2->SetPoint(2,-0.5,0.778626); grae2->SetPointError(2,0.1,0.1,0.02138501,0.02044214); grae2->SetPoint(3,-0.3,0.9301887); grae2->SetPointError(3,0.1,0.1,0.01162355,0.01053997); grae2->SetPoint(4,-0.1,0.9579125); grae2->SetPointError(4,0.1,0.1,0.008777841,0.007746169); grae2->SetPoint(5,0.1,0.9837518); grae2->SetPointError(5,0.1,0.1,0.005384068,0.004419797); grae2->SetPoint(6,0.3,0.9793205); grae2->SetPointError(6,0.1,0.1,0.005981989,0.005029422); grae2->SetPoint(7,0.5,0.9921997); grae2->SetPointError(7,0.1,0.1,0.004074668,0.003021181); grae2->SetPoint(8,0.7,0.9849341); grae2->SetPointError(8,0.1,0.1,0.005969261,0.0047315); grae2->SetPoint(9,0.9,0.9775561); grae2->SetPointError(9,0.1,0.1,0.008273072,0.00666463); grae2->SetPoint(10,1.1,0.9954128); grae2->SetPointError(10,0.1,0.1,0.006811936,0.003347394); grae2->SetPoint(11,1.3,0.9777778); grae2->SetPointError(11,0.1,0.1,0.01549005,0.01059998); grae2->SetPoint(12,1.5,1); grae2->SetPointError(12,0.1,0.1,0.02105035,0); grae2->SetPoint(13,1.7,1); grae2->SetPointError(13,0.1,0.1,0.06183102,0); grae2->SetPoint(14,1.9,1); grae2->SetPointError(14,0.1,0.1,0.1742602,0); grae2->SetMarkerColor(4); grae2->Draw("p"); TLegend *leg = new TLegend(0.35,0.25,0.85,0.4,NULL,"brNDC"); leg->SetBorderSize(0); leg->SetTextFont(42); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(2); TLegendEntry *entry=leg->AddEntry("effyP","No Background","elp"); entry->SetLineColor(2); entry->SetLineStyle(1); entry->SetLineWidth(2); entry->SetMarkerColor(2); entry->SetMarkerStyle(24); entry->SetMarkerSize(1.); TLegendEntry *entry=leg->AddEntry("effyP","With Background","pel"); entry->SetLineColor(4); entry->SetLineStyle(1); entry->SetLineWidth(2); entry->SetMarkerColor(4); entry->SetMarkerStyle(20); entry->SetMarkerSize(1.); // entry=leg->AddEntry("effyPTPC","TPC only","p"); // entry->SetLineColor(4); // entry->SetLineStyle(1); // entry->SetLineWidth(1); // entry->SetMarkerColor(4); // entry->SetMarkerStyle(21); // entry->SetMarkerSize(1.3); float x[2] = {-1,2}; float y[2] = {1.0,1.0}; TPolyLine* line = new TPolyLine(2,x,y); line->SetLineWidth(1); line->SetLineStyle(3); line->Draw(); TLatex * tex = new TLatex(-0.9,1.01,"a)"); tex->SetTextSize(0.05); tex->SetLineWidth(2); tex->Draw(); TLatex * tex = new TLatex(-0.2,0.4,"p_{T}>1GeV; n_{VTX}+n_{SIT} > 3"); tex->SetTextSize(0.045); tex->SetLineWidth(2); tex->Draw(); leg->Draw(); c1->Modified(); c1->cd(); c1->SetSelected(c1); c1->SaveAs("TrackBack_P.eps" ); c1->SaveAs("TrackBack_P.gif" ); }